


#generate fns on master
~/test/masterfns /root/test/

#copy it to slave
scp -rp ~/mfns slave1:~/mfns

#copy slave script from master node
scp -rp ~/test/generateFound slave1:~/test/genf

#execute slave script to genereate found and not found file
s
ssh slave1 "cat ~/mfns | ~/test/genf"

#copy found and not founded files back to master
ssh slave1 "scp -rp ~/found* master:~/"